import { createRouter, createWebHistory } from 'vue-router'
const routes = [
    {
        path:'/',
        component:()=>import('@/components/loginAndRegist.vue'),
    },
    {
        name:'changeWord',
        path: '/changeWord',
        component:()=>import('@/components/changeWord.vue')
    },
    {
        name: 'selectCourse',
        path: '/selectCourse',
        component:()=>import('@/components/selectCourse.vue')
    },
    {
        name: 'admin',
        path: '/admin',
        component:()=>import('@/components/adminPage.vue'),
        children:[{
            name:'MajorManagement',
            path:'/MajorManagement',
            component:()=>import('@/components/manger/MajorManagement.vue')
        },
        {
            name:'CourseManagement',
            path:'/CourseManagement',
            component:()=>import('@/components/manger/CourseManagement.vue')
        },
        {
            name:'CourseSelectionQuery',
            path:'/CourseSelectionQuery',
            component:()=>import('@/components/manger/CourseSelectionQuery.vue')
        },
        {
            name:'AccountManagement',
            path:'/AccountManagement',
            component:()=>import('@/components/manger/AccountManagement.vue')
        }
        ]
    }
] ;
const router = createRouter({
    history:createWebHistory(),
    routes,
})
export default router;